//
//  ModifyPassWordViewController.m
//  League
//
//  Created by 崔璨 on 2018/1/31.
//  Copyright © 2018年 ciyuanjuzhen. All rights reserved.
//

#import "ModifyPassWordViewController.h"

@interface ModifyPassWordViewController ()

@end

@implementation ModifyPassWordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [InternationalControl initUserLanguage];//初始化应用语言
    
    NSBundle *bundle = [InternationalControl bundle];
    
    self.title =  [bundle localizedStringForKey:@"changPW" value:nil table:@"hello"];
    
    [self setupUI];
    // Do any additional setup after loading the view.
}
-(void)setupUI
{
    [InternationalControl initUserLanguage];//初始化应用语言
    
    NSBundle *bundle = [InternationalControl bundle];
    UITextField *oldPwTF = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, self.view.width/1.2, self.view.height/13)];
    oldPwTF.center = CGPointMake(self.view.width/2, self.view.height/2 - oldPwTF.height*2);
    oldPwTF.backgroundColor = [UIColor whiteColor];
    oldPwTF.placeholder=[bundle localizedStringForKey:@"oldPW" value:nil table:@"hello"];
    oldPwTF.textColor = kAppColor;
    oldPwTF.layer.masksToBounds = YES;
    oldPwTF.layer.cornerRadius = 8;
    oldPwTF.layer.borderWidth = 2;
    oldPwTF.layer.borderColor = [kAppColor CGColor];
    [self.view addSubview:oldPwTF];
    
    UITextField *newPwTf = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, oldPwTF.width, oldPwTF.height)];
    newPwTf.center = CGPointMake(self.view.width/2, oldPwTF.y- oldPwTF.height);
    newPwTf.backgroundColor = [UIColor whiteColor];
    newPwTf.placeholder=[bundle localizedStringForKey:@"newPW" value:nil table:@"hello"];
    newPwTf.textColor = kAppColor;
    newPwTf.layer.masksToBounds = YES;
    newPwTf.layer.cornerRadius = 8;
    newPwTf.layer.borderWidth = 2;
    newPwTf.layer.borderColor = [kAppColor CGColor];
    [self.view addSubview:newPwTf];
    
    
    UIButton *overBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, oldPwTF.width, oldPwTF.height)];
    overBtn.center = CGPointMake(self.view.width/2, oldPwTF.y+oldPwTF.height+overBtn.height);
    overBtn.backgroundColor = kAppColor;
    overBtn.titleLabel.adjustsFontSizeToFitWidth = YES;
    [overBtn setTitle:[bundle localizedStringForKey:@"over" value:nil table:@"hello"] forState:UIControlStateNormal];
    [overBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    overBtn.layer.masksToBounds = YES;
    overBtn.layer.cornerRadius = 8;
    overBtn.titleLabel.font=[UIFont fontWithName:kFontName size:overBtn.height/3];
    [overBtn addTarget:self action:@selector(overBtn:) forControlEvents:UIControlEventTouchDown];
    [self.view addSubview:overBtn];
}
-(void)overBtn:(UIButton *)btn
{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
